package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.LimitRowContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.LimitClauseContext;

/**
 * limit 子句语法遍历
 * @author zwd
 *
 */
public class LimitClauseVisitor extends AbsCQLParserBaseVisitor<LimitClauseContext>{

	private LimitClauseContext context = null;
	
	public LimitClauseVisitor() {
		context = new LimitClauseContext();
	}
	
	@Override
	protected LimitClauseContext defaultResult() {
		return context;
	}
	
	@Override
	public LimitClauseContext visitLimitRow(LimitRowContext ctx) {
		context.setLimitRows(ctx.getText());
		return context;
	}
	
}
